package main

import (
	"gin_zebra/app/router"
	"gitee.com/xiedongji/go-core/lib"
	"os"
	"os/signal"
	"syscall"
)

/* =================================================================
	加载了核心配置 初始化了配置文件
 * =================================================================*/
func main() {
	lib.InitCore("./conf/dev/", []string{"base", "mysql", "redis"})
	defer lib.Destroy()

	//启动服务
	router.HttpServerRun()
	quitChanSignal := make(chan os.Signal)
	signal.Notify(quitChanSignal, syscall.SIGKILL, syscall.SIGQUIT, syscall.SIGINT, syscall.SIGTERM)
	<-quitChanSignal
	//关闭服务
	router.HttpServerStop()

}
